package com.shadow.mall.order.remote;

import com.shadow.mall.common.core.JsonResult;
import com.shadow.mall.market.domain.dto.CalculateOrderAmountDTO;
import com.shadow.mall.market.domain.dto.UserCouponDTO;
import com.shadow.mall.market.domain.query.UserCouponQuery;
import com.shadow.mall.market.domain.request.CalculateOrderAmountRequest;
import com.shadow.mall.market.domain.request.LockUserCouponRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

@Component
@FeignClient("shadow-mall-market")
public interface MarketService {


    //计算订单价格
    @RequestMapping("/market/calculateOrderAmountMarket")
    JsonResult<CalculateOrderAmountDTO> calculateOrderAmount(CalculateOrderAmountRequest calculateOrderPriceRequest);

    //鎖定优惠卷
    @RequestMapping("/market/lockUserCouponMarket")
    JsonResult<Boolean>  lockUserCoupon(LockUserCouponRequest lockUserCouponRequest);

    //获取优惠卷
    @RequestMapping("/market/getUserCouponMarket")
    JsonResult<UserCouponDTO>  getUserCoupon(UserCouponQuery userCouponQuery);
}
